import request from '../../utils/request';

/**
 * 获取页动效数据
 */
export function fetch(pageId) {
  return request(`${is.CONST.urls.page_timelines}?page_id=${pageId}`, {
    method: 'GET',
  });
}

/**
 * 更新页动效数据
 */
export function update(timeline) {
  return request(`is.CONST.urls.page_timelines?page_id=${timeline.page_id}`, {
    method: 'POST',
    body: JSON.stringify(timeline),
  });
}
